<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/12/1
 * Time: 11:14
 */
namespace app\admin\validate;
use think\validate;

class Privilege extends Validate{

    //定义验证规则
    protected $rule = [
        'pri_name'  =>  'require', //权限名称不为空
        'm_name'    =>  'require', //模块名不为空
        'c_name'    =>  'require', //控制器不为空
        'a_name'    =>  'require', //方法不为空
        'parent_id' =>  'require', //权限分类不为空

    ];
    //定义提示信息
    protected $msg = [
        'pri_name.require'      => '权限名称不为空',
        'm_name.require'        => '模块名不为空',
        'c_name.require'        => '控制器不为空',
        'a_name.require'        => '方法不为空',
        'parent_id.require'     => '权限分类不为空',
    ];
}